evaluating exponential functions